<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 钱包充值订单 基类
 * @Entity
 * @Table(name="fa_money_order", id={"id"})
 * @DDL("CREATE TABLE `fa_money_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(10) DEFAULT NULL COMMENT '用户id',
  `money` decimal(10,2) DEFAULT NULL COMMENT '充值金额',
  `pay_time` int(10) DEFAULT NULL COMMENT '支付时间',
  `pay_status` enum('1','2','3','4','5','6','7','8','9') DEFAULT '1' COMMENT '支付状态:1=待支付,2=已支付,3=已退款,4=已超时',
  `order` varchar(50) DEFAULT NULL COMMENT '订单号',
  `time` int(10) DEFAULT NULL COMMENT '创建时间',
  `pay_type` enum('1','2','3','9') DEFAULT '1' COMMENT '支付类型:1=微信,2=支付宝,9=其他',
  `pay_money` int(10) DEFAULT NULL COMMENT '实际支付（分）',
  `pay_openid` varchar(32) DEFAULT NULL COMMENT '支付者openid',
  `ps` varchar(255) DEFAULT NULL COMMENT '备注',
  `before` decimal(10,2) DEFAULT NULL COMMENT '变更前金额',
  `after` decimal(10,2) DEFAULT NULL COMMENT '变更后金额',
  `pay_update_time` int(10) DEFAULT NULL COMMENT '支付修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='钱包充值订单'")
 * @property int $id 
 * @property int $uid 用户id
 * @property float $money 充值金额
 * @property int $payTime 支付时间
 * @property string $payStatus 支付状态:1=待支付,2=已支付,3=已退款,4=已超时
 * @property string $order 订单号
 * @property int $time 创建时间
 * @property string $payType 支付类型:1=微信,2=支付宝,9=其他
 * @property int $payMoney 实际支付（分）
 * @property string $payOpenid 支付者openid
 * @property string $ps 备注
 * @property float $before 变更前金额
 * @property float $after 变更后金额
 * @property int $payUpdateTime 支付修改时间
 */
abstract class MoneyOrderBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 用户id
     * uid
     * @Column(name="uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $uid;

    /**
     * 获取 uid - 用户id
     *
     * @return int
     */ 
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 用户id
     * @param int $uid uid
     * @return static
     */ 
    public function setUid($uid)
    {
        $this->uid = $uid;
        return $this;
    }

    /**
     * 充值金额
     * money
     * @Column(name="money", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var float
     */
    protected $money;

    /**
     * 获取 money - 充值金额
     *
     * @return float
     */ 
    public function getMoney()
    {
        return $this->money;
    }

    /**
     * 赋值 money - 充值金额
     * @param float $money money
     * @return static
     */ 
    public function setMoney($money)
    {
        $this->money = $money;
        return $this;
    }

    /**
     * 支付时间
     * pay_time
     * @Column(name="pay_time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $payTime;

    /**
     * 获取 payTime - 支付时间
     *
     * @return int
     */ 
    public function getPayTime()
    {
        return $this->payTime;
    }

    /**
     * 赋值 payTime - 支付时间
     * @param int $payTime pay_time
     * @return static
     */ 
    public function setPayTime($payTime)
    {
        $this->payTime = $payTime;
        return $this;
    }

    /**
     * 支付状态:1=待支付,2=已支付,3=已退款,4=已超时
     * pay_status
     * @Column(name="pay_status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $payStatus;

    /**
     * 获取 payStatus - 支付状态:1=待支付,2=已支付,3=已退款,4=已超时
     *
     * @return string
     */ 
    public function getPayStatus()
    {
        return $this->payStatus;
    }

    /**
     * 赋值 payStatus - 支付状态:1=待支付,2=已支付,3=已退款,4=已超时
     * @param string $payStatus pay_status
     * @return static
     */ 
    public function setPayStatus($payStatus)
    {
        $this->payStatus = $payStatus;
        return $this;
    }

    /**
     * 订单号
     * order
     * @Column(name="order", type="varchar", length=50, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $order;

    /**
     * 获取 order - 订单号
     *
     * @return string
     */ 
    public function getOrder()
    {
        return $this->order;
    }

    /**
     * 赋值 order - 订单号
     * @param string $order order
     * @return static
     */ 
    public function setOrder($order)
    {
        $this->order = $order;
        return $this;
    }

    /**
     * 创建时间
     * time
     * @Column(name="time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $time;

    /**
     * 获取 time - 创建时间
     *
     * @return int
     */ 
    public function getTime()
    {
        return $this->time;
    }

    /**
     * 赋值 time - 创建时间
     * @param int $time time
     * @return static
     */ 
    public function setTime($time)
    {
        $this->time = $time;
        return $this;
    }

    /**
     * 支付类型:1=微信,2=支付宝,9=其他
     * pay_type
     * @Column(name="pay_type", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $payType;

    /**
     * 获取 payType - 支付类型:1=微信,2=支付宝,9=其他
     *
     * @return string
     */ 
    public function getPayType()
    {
        return $this->payType;
    }

    /**
     * 赋值 payType - 支付类型:1=微信,2=支付宝,9=其他
     * @param string $payType pay_type
     * @return static
     */ 
    public function setPayType($payType)
    {
        $this->payType = $payType;
        return $this;
    }

    /**
     * 实际支付（分）
     * pay_money
     * @Column(name="pay_money", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $payMoney;

    /**
     * 获取 payMoney - 实际支付（分）
     *
     * @return int
     */ 
    public function getPayMoney()
    {
        return $this->payMoney;
    }

    /**
     * 赋值 payMoney - 实际支付（分）
     * @param int $payMoney pay_money
     * @return static
     */ 
    public function setPayMoney($payMoney)
    {
        $this->payMoney = $payMoney;
        return $this;
    }

    /**
     * 支付者openid
     * pay_openid
     * @Column(name="pay_openid", type="varchar", length=32, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $payOpenid;

    /**
     * 获取 payOpenid - 支付者openid
     *
     * @return string
     */ 
    public function getPayOpenid()
    {
        return $this->payOpenid;
    }

    /**
     * 赋值 payOpenid - 支付者openid
     * @param string $payOpenid pay_openid
     * @return static
     */ 
    public function setPayOpenid($payOpenid)
    {
        $this->payOpenid = $payOpenid;
        return $this;
    }

    /**
     * 备注
     * ps
     * @Column(name="ps", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $ps;

    /**
     * 获取 ps - 备注
     *
     * @return string
     */ 
    public function getPs()
    {
        return $this->ps;
    }

    /**
     * 赋值 ps - 备注
     * @param string $ps ps
     * @return static
     */ 
    public function setPs($ps)
    {
        $this->ps = $ps;
        return $this;
    }

    /**
     * 变更前金额
     * before
     * @Column(name="before", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var float
     */
    protected $before;

    /**
     * 获取 before - 变更前金额
     *
     * @return float
     */ 
    public function getBefore()
    {
        return $this->before;
    }

    /**
     * 赋值 before - 变更前金额
     * @param float $before before
     * @return static
     */ 
    public function setBefore($before)
    {
        $this->before = $before;
        return $this;
    }

    /**
     * 变更后金额
     * after
     * @Column(name="after", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var float
     */
    protected $after;

    /**
     * 获取 after - 变更后金额
     *
     * @return float
     */ 
    public function getAfter()
    {
        return $this->after;
    }

    /**
     * 赋值 after - 变更后金额
     * @param float $after after
     * @return static
     */ 
    public function setAfter($after)
    {
        $this->after = $after;
        return $this;
    }

    /**
     * 支付修改时间
     * pay_update_time
     * @Column(name="pay_update_time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $payUpdateTime;

    /**
     * 获取 payUpdateTime - 支付修改时间
     *
     * @return int
     */ 
    public function getPayUpdateTime()
    {
        return $this->payUpdateTime;
    }

    /**
     * 赋值 payUpdateTime - 支付修改时间
     * @param int $payUpdateTime pay_update_time
     * @return static
     */ 
    public function setPayUpdateTime($payUpdateTime)
    {
        $this->payUpdateTime = $payUpdateTime;
        return $this;
    }

}
